<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>角色列表</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" href="<%=path%>/css/demo.css" type="text/css">
	<link rel="stylesheet" href="<%=path%>/css/table.css" type="text/css">
	<link rel="stylesheet" href="<%=path%>/css/zTreeStyle/zTreeStyle.css" type="text/css">
	<script type="text/javascript" src="/RMS/js/jquery.js"></script>
	<script type="text/javascript" src="/RMS/js/role/list.js"></script>
	<script type="text/javascript" src="/RMS/js/jquery.ztree.core-3.1.js"></script>
	<script type="text/javascript" src="/RMS/js/jquery.ztree.excheck-3.1.js"></script>

	
  </head>
  
  <body>
 	
    <form action="/RMS/main/role/updateByTree.action" method="post" id="updateByTree">
    	<s:hidden id="nodeSelect" name="nodeSelect"></s:hidden>
    </form>
    <div style="float:left;width:300px;text-align:middle">
		<ul id="treeDemo" class="ztree"></ul>
		<input id="getNodes" type="button" value="提交"/>
	</div>
    <div style="text-aglin;center" id='roleManager'>
     	角色管理 <span id="addRole"><a href="javascript:void(0)">添加角色</a></span><br>
 	 
    	<table width="653" border="0" cellpadding="0" cellspacing="1" >
    		<thead>
    			<tr>
    				<th>角色ID</th>
    				<th>角色名</th>
    				<th>描述</th>
    				<th>操作</th>
  					
    			</tr>
    		</thead>
    		<tbody>
    			<s:if test="roleList!=null">
    				<s:iterator value="roleList" status="index">
    					<tr>
    						<td><s:if test="roleId==null || roleId=='' ">--</s:if><s:else><s:property value="roleId"/></s:else></td>
    						<td><s:if test="roleName==null || roleName=='' ">--</s:if><s:else><s:property value="roleName"/></s:else></td>
    						<td><s:if test="roleDesc==null || roleDesc=='' ">--</s:if><s:else><s:property value="roleDesc"/></s:else></td>
    						<td><a href="javascript:void(0)" id="findUpdate" name="<s:property value="roleId"/>">修改</a><a href="javascript:void(0)" id="delete" name="<s:property value="roleId"/>">删除</a></td>
    					</tr>
    				</s:iterator>
    			</s:if>
    		</tbody>
    	</table>
    </div>
    <div id="add" style="float: left">
	    <form action="main/role/addRole" method="post">
	   	 添加角色
	    <table>
	    	<tbody>
	    		<tr><th>角色名：</th><td><input type="text" name="role.roleName"/></td></tr>
	    		<tr><th>描      述：</th><td><textarea name="role.roleDesc" style="height:100px;width:200px"></textarea></td></tr>
	    		<%--<tr><th>状      态：</th><td><input type="radio" name="role.status"  value="1"/></td></tr>
	    		--%><tr><s:checkboxlist label="继承角色" list="roleList" listKey="roleId" listValue="roleName"  name="proleIdArray"/></tr>
	    		<tr><th>操      作：</th><td><input type="submit" id="submit" value="增加"><input type="button" id="cancel" value="取消"></td></tr>
	    	</tbody>
	    </table>
	    </form>
    </div>
    
   
  </body>
</html>
